
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <title>安装 · GitBook</title>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.1.1">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-disqus/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-multipart/multipart.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-toggle-chapters/toggle.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="exploring_your_cluster.html" />
    
    
    <link rel="prev" href="basic_concepts.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="getting_started.html">
            
                <a href="getting_started.html">
            
                    
                    入门指南
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="basic_concepts.html">
            
                <a href="basic_concepts.html">
            
                    
                    基本概念
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.2" data-path="installation.html">
            
                <a href="installation.html">
            
                    
                    安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="exploring_your_cluster.html">
            
                <a href="exploring_your_cluster.html">
            
                    
                    探索集群
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.3.1" data-path="cluster_health.html">
            
                <a href="cluster_health.html">
            
                    
                    集群健康度
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.2" data-path="list_all_indices.html">
            
                <a href="list_all_indices.html">
            
                    
                    列出所有索引
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.3" data-path="create_index.html">
            
                <a href="create_index.html">
            
                    
                    创建索引
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.4" data-path="index_and_query_a_document.html">
            
                <a href="index_and_query_a_document.html">
            
                    
                    索引和查询文档
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.5" data-path="delete_index.html">
            
                <a href="delete_index.html">
            
                    
                    删除索引
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="modifying_your_data.html">
            
                <a href="modifying_your_data.html">
            
                    
                    修改数据
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.4.1" data-path="updating_documents.html">
            
                <a href="updating_documents.html">
            
                    
                    更新文档
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.2" data-path="deleting_documents.html">
            
                <a href="deleting_documents.html">
            
                    
                    删除文档
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.3" data-path="batch_processing.html">
            
                <a href="batch_processing.html">
            
                    
                    批量操作
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="exploring_your_data.html">
            
                <a href="exploring_your_data.html">
            
                    
                    探索数据
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.5.1" data-path="the_search_api.html">
            
                <a href="the_search_api.html">
            
                    
                    搜索 API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5.2" data-path="introducing_query_language.html">
            
                <a href="introducing_query_language.html">
            
                    
                    查询语言介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5.3" data-path="executing_searches.html">
            
                <a href="executing_searches.html">
            
                    
                    执行搜索
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5.4" data-path="executing_filters.html">
            
                <a href="executing_filters.html">
            
                    
                    执行过滤器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5.5" data-path="executing_aggregations.html">
            
                <a href="executing_aggregations.html">
            
                    
                    执行聚合
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="conclusion.html">
            
                <a href="conclusion.html">
            
                    
                    小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >安装</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5B89;&#x88C5;">&#x5B89;&#x88C5;</h1>
<p>Elasticsearch &#x8981;&#x6C42; Java &#x7248;&#x672C;&#x81F3;&#x5C11;&#x662F; Java 7&#x3002;&#x5728;&#x64B0;&#x5199;&#x672C;&#x6587;&#x65F6;&#xFF0C;&#x63A8;&#x8350;&#x4F7F;&#x7528; Oracle JDK version 1.8.0_73&#x3002;Java &#x5B89;&#x88C5;&#x56E0;&#x5E73;&#x53F0;&#x4E0D;&#x540C;&#x800C;&#x6709;&#x6240;&#x4E0D;&#x540C;&#xFF0C;&#x6240;&#x4EE5;&#x6211;&#x4EEC;&#x4E0D;&#x4F1A;&#x6DF1;&#x5165;&#x8FD9;&#x4E9B;&#x7EC6;&#x8282;&#x3002;Oracle &#x63A8;&#x8350;&#x7684;&#x5B89;&#x88C5;&#x6587;&#x6863;&#x53EF;&#x4EE5;&#x5728; <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html" target="_blank">Oracle&#x2019;s website</a> &#x627E;&#x5230;&#x3002;&#x5728;&#x5B89;&#x88C5; Elasticsearch &#x4E4B;&#x524D;&#xFF0C;&#x8BF7;&#x9996;&#x5148;&#x68C0;&#x67E5; Java &#x7248;&#x672C;&#xFF1A;</p>
<pre><code class="lang-sh">java -version
<span class="hljs-built_in">echo</span> <span class="hljs-variable">$JAVA_HOME</span>
</code></pre>
<p>&#x4E00;&#x65E6; JAVA &#x5B89;&#x88C5;&#x5B8C;&#x6BD5;&#xFF0C;&#x5C31;&#x53EF;&#x4EE5;&#x4E0B;&#x8F7D;&#x548C;&#x5B89;&#x88C5; Elasticsearch&#x3002;&#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;&#x53EF;&#x4EE5;&#x4ECE;<a href="https://www.elastic.co/downloads" target="_blank">www.elastic.co/downloads</a> &#x4E0B;&#x8F7D;&#x6240;&#x6709;&#x7684; releases&#x3002;&#x9488;&#x5BF9;&#x6BCF;&#x4E00;&#x4E2A; release&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x9009;&#x62E9; <code>zip</code> &#x6216; <code>tar</code> &#x5B58;&#x6863;&#x6587;&#x4EF6;&#xFF0C;&#x6216;&#x8005;&#x662F; <code>DEB</code>&#xFF0C;<code>RPM</code> package&#x3002;&#x4E3A;&#x7B80;&#x5355;&#x8D77;&#x89C1;&#xFF0C;&#x6211;&#x4EEC;&#x4F7F;&#x7528; tar &#x6587;&#x4EF6;&#x3002;</p>
<p>&#x6309;&#x7167;&#x4E0B;&#x9762;&#x7684;&#x547D;&#x4EE4;&#x4E0B;&#x8F7D; <code>Elasticsearch 2.3.3</code>&#xFF08;Windows &#x7528;&#x6237;&#x5E94;&#x8BE5;&#x9009;&#x62E9; <code>zip</code> package&#xFF09;</p>
<pre><code class="lang-sh">curl -L -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.3.3/elasticsearch-2.3.3.tar.gz
</code></pre>
<p>&#x7136;&#x540E;&#x89E3;&#x538B;&#xFF1A;</p>
<pre><code class="lang-sh">tar -xvf elasticsearch-2.3.3.tar.gz
</code></pre>
<p>&#x8BE5;&#x547D;&#x4EE4;&#x4F1A;&#x5728;&#x5F53;&#x524D;&#x76EE;&#x5F55;&#x521B;&#x5EFA;&#x4E00;&#x7CFB;&#x5217;&#x7684;&#x6587;&#x4EF6;&#x548C;&#x6587;&#x4EF6;&#x5939;&#xFF0C;&#x8FDB;&#x5165;&#x5230; <code>bin</code> &#x76EE;&#x5F55;&#xFF1A;</p>
<pre><code class="lang-sh"><span class="hljs-built_in">cd</span> elasticsearch-2.3.3/bin
</code></pre>
<p>&#x7136;&#x540E;&#x542F;&#x52A8;&#x8282;&#x70B9;&#x548C;&#x5355;&#x4E2A;&#x96C6;&#x7FA4;&#xFF1A;</p>
<pre><code class="lang-sh">./elasticsearch
</code></pre>
<p>&#x5982;&#x679C;&#x4E00;&#x5207;&#x987A;&#x5229;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x770B;&#x5230;&#x5982;&#x4E0B;&#x7684;&#x4E00;&#x7CFB;&#x5217;&#x6D88;&#x606F;&#xFF1A;</p>
<pre><code class="lang-log">./elasticsearch
[2014-03-13 13:42:17,218][INFO ][node           ] [New Goblin] version[2.3.3], pid[2085], build[5c03844/2014-02-25T15:52:53Z]
[2014-03-13 13:42:17,219][INFO ][node           ] [New Goblin] initializing ...
[2014-03-13 13:42:17,223][INFO ][plugins        ] [New Goblin] loaded [], sites []
[2014-03-13 13:42:19,831][INFO ][node           ] [New Goblin] initialized
[2014-03-13 13:42:19,832][INFO ][node           ] [New Goblin] starting ...
[2014-03-13 13:42:19,958][INFO ][transport      ] [New Goblin] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.8.112:9300]}
[2014-03-13 13:42:23,030][INFO ][cluster.service] [New Goblin] new_master [New Goblin][rWMtGj3dQouz2r6ZFL9v4g][mwubuntu1][inet[/192.168.8.112:9300]], reason: zen-disco-join (elected_as_master)
[2014-03-13 13:42:23,100][INFO ][discovery      ] [New Goblin] elasticsearch/rWMtGj3dQouz2r6ZFL9v4g
[2014-03-13 13:42:23,125][INFO ][http           ] [New Goblin] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.8.112:9200]}
[2014-03-13 13:42:23,629][INFO ][gateway        ] [New Goblin] recovered [1] indices into cluster_state
[2014-03-13 13:42:23,630][INFO ][node           ] [New Goblin] started
</code></pre>
<p>&#x6CA1;&#x6709;&#x592A;&#x591A;&#x7684;&#x7EC6;&#x8282;&#xFF0C;&#x53EF;&#x4EE5;&#x770B;&#x5230;&#x53EB;&#x505A; &quot;New Goblin&quot;&#xFF08;&#x5728;&#x4F60;&#x7684;&#x673A;&#x5668;&#x4E0A;&#x53EF;&#x80FD;&#x6709;&#x6240;&#x4E0D;&#x540C;&#xFF09;&#x7684;&#x8282;&#x70B9;&#x88AB;&#x542F;&#x52A8;&#xFF0C;&#x5E76;&#x4E14;&#x88AB;&#x96C6;&#x7FA4;&#x9009;&#x62E9;&#x4E3A;&#x4E3B;&#x8282;&#x70B9;&#x3002;&#x4E0D;&#x7528;&#x62C5;&#x5FC3;&#x4E3B;&#x8282;&#x70B9;&#x610F;&#x5473;&#x7740;&#x4EC0;&#x4E48;&#xFF0C;&#x91CD;&#x8981;&#x7684;&#x662F;&#x6211;&#x4EEC;&#x5728;&#x96C6;&#x7FA4;&#x5185;&#x542F;&#x52A8;&#x4E86;&#x4E00;&#x4E2A;&#x8282;&#x70B9;&#x3002;</p>
<p>&#x6B63;&#x5982;&#x6211;&#x4EEC;&#x4E4B;&#x524D;&#x6240;&#x63D0;&#x5230;&#x7684;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x8986;&#x76D6;&#x96C6;&#x7FA4;&#x6216;&#x8282;&#x70B9;&#x7684;&#x540D;&#x79F0;&#x3002;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x5B9E;&#x73B0;&#xFF1A;</p>
<pre><code class="lang-sh">./elasticsearch --cluster.name my_cluster_name --node.name my_node_name
</code></pre>
<p>&#x6CE8;&#x610F; HTTP &#x5730;&#x5740;(192.168.8.112)&#x548C;&#x7AEF;&#x53E3;(9200)&#x4FE1;&#x606F;&#xFF0C;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;Elasticsearch &#x4F7F;&#x7528; 9200 &#x7AEF;&#x53E3;&#x53BB;&#x63D0;&#x4F9B;&#x5176; REST API &#x8BBF;&#x95EE;&#x6743;&#x9650;&#x3002;&#x5982;&#x679C;&#x5FC5;&#x8981;&#xFF0C;&#x8FD9;&#x4E2A;&#x7AEF;&#x53E3;&#x662F;&#x53EF;&#x914D;&#x7F6E;&#x7684;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="basic_concepts.html" class="navigation navigation-prev " aria-label="Previous page: 基本概念">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="exploring_your_cluster.html" class="navigation navigation-next " aria-label="Next page: 探索集群">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"安装","level":"1.2.2","depth":2,"next":{"title":"探索集群","level":"1.2.3","depth":2,"path":"exploring_your_cluster.md","ref":"exploring_your_cluster.md","articles":[{"title":"集群健康度","level":"1.2.3.1","depth":3,"path":"cluster_health.md","ref":"cluster_health.md","articles":[]},{"title":"列出所有索引","level":"1.2.3.2","depth":3,"path":"list_all_indices.md","ref":"list_all_indices.md","articles":[]},{"title":"创建索引","level":"1.2.3.3","depth":3,"path":"create_index.md","ref":"create_index.md","articles":[]},{"title":"索引和查询文档","level":"1.2.3.4","depth":3,"path":"index_and_query_a_document.md","ref":"index_and_query_a_document.md","articles":[]},{"title":"删除索引","level":"1.2.3.5","depth":3,"path":"delete_index.md","ref":"delete_index.md","articles":[]}]},"previous":{"title":"基本概念","level":"1.2.1","depth":2,"path":"basic_concepts.md","ref":"basic_concepts.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["disqus","github","github-buttons","multipart","toggle-chapters","livereload"],"pluginsConfig":{"disqus":{"useIdentifier":false,"shortName":"liuzxc"},"github":{"url":"https://github.com/liuzxc/Elasticsearch_reference_cn.git"},"livereload":{},"search":{},"multipart":{},"lunr":{"maxIndexSize":1000000},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"github-buttons":{"repo":"liuzxc/Elasticsearch_reference_cn","types":["star","watch"]},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"toggle-chapters":{}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"installation.md","mtime":"2016-07-04T15:21:00.000Z","type":"markdown"},"gitbook":{"version":"3.1.1","time":"2016-07-07T15:30:51.488Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="https://cdnjs.cloudflare.com/ajax/libs/URI.js/1.16.1/URI.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-disqus/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-toggle-chapters/toggle.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

